3.916 \(\int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx\)

Optimal. Leaf size=82 \[ \frac {a^3 c^4 \tan ^5(e+f x)}{5 f}+\frac {2 a^3 c^4 \tan ^3(e+f x)}{3 f}+\frac {a^3 c^4 \tan (e+f x)}{f}-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f} \]

[Out]

-1/6*I*a^3*c^4*sec(f*x+e)^6/f+a^3*c^4*tan(f*x+e)/f+2/3*a^3*c^4*tan(f*x+e)^3/f+1/5*a^3*c^4*tan(f*x+e)^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3486, 3767} \[ \frac {a^3 c^4 \tan ^5(e+f x)}{5 f}+\frac {2 a^3 c^4 \tan ^3(e+f x)}{3 f}+\frac {a^3 c^4 \tan (e+f x)}{f}-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^4,x]

[Out]

((-I/6)*a^3*c^4*Sec[e + f*x]^6)/f + (a^3*c^4*Tan[e + f*x])/f + (2*a^3*c^4*Tan[e + f*x]^3)/(3*f) + (a^3*c^4*Tan
[e + f*x]^5)/(5*f)

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4 \, dx &=\left (a^3 c^3\right ) \int \sec ^6(e+f x) (c-i c \tan (e+f x)) \, dx\\ &=-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f}+\left (a^3 c^4\right ) \int \sec ^6(e+f x) \, dx\\ &=-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f}-\frac {\left (a^3 c^4\right ) \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=-\frac {i a^3 c^4 \sec ^6(e+f x)}{6 f}+\frac {a^3 c^4 \tan (e+f x)}{f}+\frac {2 a^3 c^4 \tan ^3(e+f x)}{3 f}+\frac {a^3 c^4 \tan ^5(e+f x)}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 4.24, size = 63, normalized size = 0.77 \[ \frac {a^3 c^4 \sec (e) \sec ^6(e+f x) (15 \sin (e+2 f x)+6 \sin (3 e+4 f x)+\sin (5 e+6 f x)-10 \sin (e)-10 i \cos (e))}{60 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a^3*c^4*Sec[e]*Sec[e + f*x]^6*((-10*I)*Cos[e] - 10*Sin[e] + 15*Sin[e + 2*f*x] + 6*Sin[3*e + 4*f*x] + Sin[5*e
+ 6*f*x]))/(60*f)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 120, normalized size = 1.46 \[ \frac {240 i \, a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 96 i \, a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 16 i \, a^{3} c^{4}}{15 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")

[Out]

1/15*(240*I*a^3*c^4*e^(4*I*f*x + 4*I*e) + 96*I*a^3*c^4*e^(2*I*f*x + 2*I*e) + 16*I*a^3*c^4)/(f*e^(12*I*f*x + 12
*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*
I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

giac [A]  time = 1.49, size = 128, normalized size = 1.56 \[ \frac {240 i \, a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 96 i \, a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 16 i \, a^{3} c^{4}}{15 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")

[Out]

1/15*(240*I*a^3*c^4*e^(4*I*f*x + 4*I*e) + 96*I*a^3*c^4*e^(2*I*f*x + 2*I*e) + 16*I*a^3*c^4)/(f*e^(12*I*f*x + 12
*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*
I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 71, normalized size = 0.87 \[ \frac {a^{3} c^{4} \left (\tan \left (f x +e \right )-\frac {i \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {\left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {i \left (\tan ^{4}\left (f x +e \right )\right )}{2}+\frac {2 \left (\tan ^{3}\left (f x +e \right )\right )}{3}-\frac {i \left (\tan ^{2}\left (f x +e \right )\right )}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x)

[Out]

1/f*a^3*c^4*(tan(f*x+e)-1/6*I*tan(f*x+e)^6+1/5*tan(f*x+e)^5-1/2*I*tan(f*x+e)^4+2/3*tan(f*x+e)^3-1/2*I*tan(f*x+
e)^2)

________________________________________________________________________________________

maxima [A]  time = 0.82, size = 100, normalized size = 1.22 \[ \frac {-10 i \, a^{3} c^{4} \tan \left (f x + e\right )^{6} + 12 \, a^{3} c^{4} \tan \left (f x + e\right )^{5} - 30 i \, a^{3} c^{4} \tan \left (f x + e\right )^{4} + 40 \, a^{3} c^{4} \tan \left (f x + e\right )^{3} - 30 i \, a^{3} c^{4} \tan \left (f x + e\right )^{2} + 60 \, a^{3} c^{4} \tan \left (f x + e\right )}{60 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")

[Out]

1/60*(-10*I*a^3*c^4*tan(f*x + e)^6 + 12*a^3*c^4*tan(f*x + e)^5 - 30*I*a^3*c^4*tan(f*x + e)^4 + 40*a^3*c^4*tan(
f*x + e)^3 - 30*I*a^3*c^4*tan(f*x + e)^2 + 60*a^3*c^4*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 4.55, size = 117, normalized size = 1.43 \[ \frac {a^3\,c^4\,\sin \left (e+f\,x\right )\,\left (30\,{\cos \left (e+f\,x\right )}^5-{\cos \left (e+f\,x\right )}^4\,\sin \left (e+f\,x\right )\,15{}\mathrm {i}+20\,{\cos \left (e+f\,x\right )}^3\,{\sin \left (e+f\,x\right )}^2-{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^3\,15{}\mathrm {i}+6\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^4-{\sin \left (e+f\,x\right )}^5\,5{}\mathrm {i}\right )}{30\,f\,{\cos \left (e+f\,x\right )}^6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i)^4,x)

[Out]

(a^3*c^4*sin(e + f*x)*(6*cos(e + f*x)*sin(e + f*x)^4 - cos(e + f*x)^4*sin(e + f*x)*15i + 30*cos(e + f*x)^5 - s
in(e + f*x)^5*5i - cos(e + f*x)^2*sin(e + f*x)^3*15i + 20*cos(e + f*x)^3*sin(e + f*x)^2))/(30*f*cos(e + f*x)^6
)

________________________________________________________________________________________

sympy [B]  time = 0.71, size = 184, normalized size = 2.24 \[ \frac {- 240 a^{3} c^{4} e^{4 i e} e^{4 i f x} - 96 a^{3} c^{4} e^{2 i e} e^{2 i f x} - 16 a^{3} c^{4}}{15 i f e^{12 i e} e^{12 i f x} + 90 i f e^{10 i e} e^{10 i f x} + 225 i f e^{8 i e} e^{8 i f x} + 300 i f e^{6 i e} e^{6 i f x} + 225 i f e^{4 i e} e^{4 i f x} + 90 i f e^{2 i e} e^{2 i f x} + 15 i f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(c-I*c*tan(f*x+e))**4,x)

[Out]

(-240*a**3*c**4*exp(4*I*e)*exp(4*I*f*x) - 96*a**3*c**4*exp(2*I*e)*exp(2*I*f*x) - 16*a**3*c**4)/(15*I*f*exp(12*
I*e)*exp(12*I*f*x) + 90*I*f*exp(10*I*e)*exp(10*I*f*x) + 225*I*f*exp(8*I*e)*exp(8*I*f*x) + 300*I*f*exp(6*I*e)*e
xp(6*I*f*x) + 225*I*f*exp(4*I*e)*exp(4*I*f*x) + 90*I*f*exp(2*I*e)*exp(2*I*f*x) + 15*I*f)

________________________________________________________________________________________